<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>创业者服务首页</title>
	<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/video-js.css">
	<link rel="stylesheet" href="../css/leftSidebar.css">
</head>
<style type="text/css">
	html,body{height: 100%;}
	.col-xs-12.nav_right{padding: 0;height: 100px;padding-right: 0;margin-right: 0;min-width: 1100px;height: 100px;padding-right: 0;margin-right: 0;padding-left: 160px;}
	#myTab a{color: #7c7c7c; font-size: 15px;}
	#myTab>li.active>a{color: #3f4142; background-color: #fff;}
	.navbar-form{margin-top: 0;}
	.tab_creat .active{color:#6bc50d;}
	.table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active{background-color: #fff;}
	.table>tfoot>tr.active>td{background-color: #fff;}
	.table>tbody>tr>td{border-top:0;}
	.table{margin-bottom: 0;}
	div.tab_creat.row{background-color: #fff;}
	.tab_font{padding: 10px 0;}
	.tab_font div,.tab_font td{font-size: 14px;color: #919191;}
	.gongsi_list div.col-xs-2,.gongsi_list div.col-xs-1,.gongsi_list div.col-xs-4{text-align: center;padding: 20px 0;}
	.gongsi_list.row{background-color: #fff;margin-top: 20px;}
	.gongsi_list dd div.col-xs-2{font-size: 14px;color: #4f5051;}
	.row{margin: 0;}
	.sub_logo{position: relative;display: inline-block;padding-left: 0;}
	.sub_logo input{opacity: 0;position: absolute;left: 0;right: 0;bottom: 0;top: 0;}
	.zhube_head{border-bottom: 1px solid #ddd;}
	.zhube_head h3{padding: 5px 0;, color: #222c38;font-size: 16px;border-bottom: 4px solid #5a626d;}

	#form_test label{font-size: 14px; color: #515151;font-weight: normal;}
	#form_test  .media-middle{font-size: 14px;color: #acacac;}
	.form_tip{font-size: 12px;color: #acacac; }
	.btn-default{border-color: #d4252a;color: #d4252a;}
	.btn-default.disabled{background-color: #ccc;color: #fff;border-color:#ccc;}
	.btn-default.disabled.focus, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled].focus, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover{background-color: #ccc;color: #fff;}
	.label.label-danger{color: #d5272d;background-color: #ffe6e7 ;font-weight: normal;}
	.media-body p{padding: 20px 0;}
	.xq_bg{background-color: #fff;padding: 20px 0;}

	/*详情界面*/
	#navbar-example{border: 0;background-color: #fff;}
	#navbar-example .nav-pills>li.active>a{border-bottom: 4px solid #d5272d; background-color: #fff;border-radius: 0;color: #222c38;}
	#navbar-example .nav-pills>li>a{font-size: 22px;color: #5a626d;}
	.progress_jieshao h4{font-size: 22px;border-left: 4px solid #222c38;padding: 0 10px;margin-top: 20px;}
	h4>button{float:right;padding: 2px 12px!important;}
	.progress_jieshao p{font-size: 18px;color: #5a626d;line-height: 30px;padding:0 10px;}
	.progress_jieshao section{font-size: 18px;color: #5a626d;padding: 0 10px;}
	.panel_name{font-size: 16px; color: #969fa8;padding: 0 10px;}
	.panne_exp ul>li{margin: 20px 0;}
	.panne_exp ul>li:last-child{margin-top: 10px;}
	.panel-title{font-size: 24px;color: #222c38;font-weight: bold;}
	.extra{padding: 10px 10px 15px 10px;}
	.extra>span:nth-child(1){font-weight: bolder;font-size:16px;margin-right:50px;}
	.extra>span:nth-child(2){color:#969fa8;margin-right:50px;}
	.extra>span:nth-child(3){color:#6bc50d;}
	.star{margin: 10px 0px;}
	.star>span{color:#969fa8;margin-left: 10px;}
	textarea{width:100%;background:#f5f5f5;border-color: #ddd;padding:20px 10px;}
</style>
<body style="background-color: #f2f2f2;">
<div class="row warp" style="height: 100%;">
	<div class="nav_right_head">
		<a href="../index.html"><img src="../img/roleIndexBg.jpg" onerror="onErrorHandle(this)"/></a>
	</div>
	<!--左侧导航-->
	<div class="col-xs-2 nav_left">
		<div class="creatNav">创业者服务</div>
		<div class="creatLoginStatus"><img src="../img/avtar.png"><a>您好，创业者</a></div>
		<div class="list-group" style="padding: 0;">
			<a href="cyzfw_index.html" class="list-group-item active"><i class="glyphicon glyphicon-home"></i> 首页</a>
			<a href="cyzfw_zuche.html" class="list-group-item"><i class="glyphicon glyphicon-plus-sign"></i> 注册项目</a>
			<a href="cyzfw_myProgress.html" class="list-group-item "><i class="glyphicon glyphicon-folder-open"></i> 我的项目</a>
			<a href="cyzfw_mynews.html" class="list-group-item"><i class="glyphicon glyphicon-book"></i> 我的消息</a>
			<div class="list-group listAttention">
				<div class="list-group-item" > <span class="caret"></span> 我的关注</div>
				<a href="cyzfw_gz_touziren.html" class="list-group-item"><i class="glyphicon glyphicon-usd"></i> 投资人/机构</a>
				<a href="cyzfw_gz_daoshi.html" class="list-group-item"><i class="glyphicon glyphicon-user"></i> 导师</a>
				<a href="cyzfw_gz_xiangmu.html" class="list-group-item"><i class="glyphicon glyphicon-lock"></i> 项目</a>
			</div>

		</div>
		<div class="backBtn"> <a href="../index.html"><img src="../img/backIndex.png"></a></div>
	</div>

	<div class="col-xs-12 nav_right">


		<div class="row">
			<div class="xq_bg" style="">

				<div class="row">
					<div class="col-xs-6 col-xs-offset-1">
						<div class="media">
							<div class="media-left">
								<a href="#">
									<img class="media-object Pblogo" src="../img/020.jpg" onerror="onErrorHandle(this)" style="width: 140px;height: 140px;" alt="">
								</a>
							</div>
							<div class="media-body pbIntroduce">
								<h4 class="media-heading" style="padding-top: 20px;">小橙科技 <small>互联网·广东省·2006年</small></h4>
								<p>移动互联网创业平台</p>


							</div>
						</div>
					</div>

					<div class="col-xs-3 col-xs-offset-1" style="padding-right: 0;">
						<div class="panel panel-default">
							<div class="panel-heading text-center">上轮获投</div>
							<dl class="text-center row" style="padding: 10px;">
								<dt><div class="col-xs-6">C轮</div><div class="col-xs-6">￥2000万</div></dt>
								<dd><div class="col-xs-6">轮次</div><div class="col-xs-6">金额</div></dd>
							</dl>
						</div>
					</div>
				</div>
			</div>
		</div>

		<nav id="navbar-example" class="navbar navbar-default navbar-static" role="navigation">
			<div class="row">
				<div class="bs-js-navbar-scrollspy col-xs-10 col-xs-offset-1">
					<ul class="nav nav-pills navbar-left">
						<li class="active"><a href="#introduce">项目介绍</a></li>
						<li><a href="#experience">融资经历</a></li>
						<li><a href="#suggest">导师建议</a></li>
						<li><a href="#progress">相似项目</a></li>
					</ul>
					<div class="navbar-right">
						<button class="btn btn-default attentionPb">关注</button>
					</div>

				</div>

			</div>

		</nav>

		<div class="col-xs-10 col-xs-offset-1">

			<div data-spy="scroll" data-target="#navbar-example" data-offset="0"
				 style=" position: relative;">
				<div class="panel panel-default progress_jieshao">
					<div class="panel-heading">
						<h3 class="panel-title" id="introduce">项目介绍 <small>（非熠星项目）</small> <small>（审核已通过）</small></h3>
					</div>
					<div class="panel-body">
						<ul class="list-unstyled " id="pbDetailList">
							<li>
								<h4>概述</h4>
								<p>使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。</p>
								<div class="panel_name">公司全称：<span>小橙科技有限公司</span></div>
							</li>
							<li>
								<h4>详细介绍</h4>
								<section>产品服务</section>
								<p>使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。</p>
							</li>
							<li>
								<h4>团队人数</h4>
								<section>5</section>
							</li>
							<li>
								<h4>技术关键字</h4>
								<section> 大数据</section>
							</li>
							<li>
								<h4>融资阶段</h4>
								<section>未融资</section>
							</li>
							<li>
								<h4>商业计划书</h4>
								<section> <a href="###">点击下载</a></section>
							</li>
						</ul>



					</div>
				</div>

				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title" id="experience">融资经历</h3>
					</div>
					<div class="panel-body panne_exp">
						<ul class="row list-unstyled">
							<li class="col-xs-3">
								2017-3-18
							</li>
							<li class="col-xs-3">
								<b>C轮</b>
							</li>
							<li class="col-xs-3" style="">
								<div>投资金额：<span>2000万人民币</span></div>
								<div>投资方：<span>喜中投资基金</span></div>
							</li>
						</ul>
						<ul class="row list-unstyled">
							<li class="col-xs-3">
								2017-3-18
							</li>
							<li class="col-xs-3">
								<b>C轮</b>
							</li>
							<li class="col-xs-3" style="">
								<div>投资金额：<span>2000万人民币</span></div>
								<div>投资方：<span>喜中投资基金</span></div>
							</li>
						</ul>

					</div>
				</div>

				<!-- 导师建议 -->
				<div class="panel panel-default progress_jieshao" id="tutorSuggest">
					<div class="panel-heading">
						<h3 class="panel-title" id="suggest">导师建议</h3>
					</div>
					<div class="panel-body">
						<h4>历史评分<button class="btn btn-default hidden">保存</button></h4>
						<div class="extra"><span>7.5</span><span>2017-03-02</span><span>导师:陈西军</span></div>
						<p>使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。使用Max是一个自制内容、自运营内容打造自有IP的公司。</p>
						<div class="hidden">
							<h4>当前评分</h4>
							<p class="star">请给项目打分:<span>10分</span></p>
							<div>
								<textarea name="name" rows="8" cols="80" placeholder="请输入您对该项目的意见或建议,1000字以内"></textarea>
							</div>

						</div>

					</div>
				</div>

				<!--相关项目-->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title " id="progress">相关项目</h3>
					</div>
					<div class="panel-body" style="padding: 0;">
						<div class="row gongsi_list">
							<dl style="background-color: #fff;">
								<dt>
								<div class="row">
									<div class="col-xs-2">创业公司</div>
									<div class="col-xs-2">融资阶段</div>
									<div class="col-xs-2">创业领域</div>
									<div class="col-xs-2">导师</div>
									<div class="col-xs-2">过往投资方</div>
									<div class="col-xs-2">操作</div>
								</div>
								</dt>
								<div id="RelatedPb">

								</div>

						</div>

								<!---->
								<!--<dd>-->
									<!--<div class="row">-->
										<!--<div class="col-xs-4" style="padding-top: 10px;">-->
											<!--<div class="media">-->
												<!--<div class="media-left media-middle" style="padding: 0px 15px;">-->
													<!--<img src="../img/carous.png" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/>-->
												<!--</div>-->
												<!--<div class="media-body text-left">-->
													<!--<span style="display: inline-block;margin-top: 10px;">小橙科技</span>-->

												<!--</div>-->
											<!--</div>-->
										<!--</div>-->

										<!--<div class="col-xs-2">201703024</div>-->
										<!--<div class="col-xs-2">生活消费</div>-->
										<!--<div class="col-xs-1">哈哈哈</div>-->
										<!--<div class="col-xs-2">无</div>-->
										<!--<div class="col-xs-1">哈哈</div>-->


									<!--</div>-->

								<!--</dd>-->
							<!---->
							</dl>

						</div>
					</div>
				</div>


			</div>

		</div>

	</div>
</div>
</body>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/jquery.media.js"></script>
<script src="../js/videojs-ie8.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
<script type="text/javascript" src="../js/bootstrap-paginator.min.js"></script>
<script type="text/javascript" src="../js/public.js"></script>
<script type="text/javascript">

    var person = JSON.parse(sessionStorage.getItem("person"));
    if (person==''||person==null) {
        alert('请先登录')
        window.location.href='denglu.html';
    } else{
        var userId = person.userid;
    }






    var id = location.href.split('?')[1];
    console.log(id)
    //我的项目列表
    $.ajax({
        type: "get",
        url:"http://114.112.96.184:18080/view/pb/"+id,
        data:{'userId':userId},
        error: function(request) {
            console.log("Connection error");
        },
        success: function(data) {
            console.log(data)
		var objPb = data.result.pb;
        var createTime='';
        createTime=objPb.createTime.substring(0,4);
            $('.Pblogo').attr('src',objPb.logo);
		var pbName =''+objPb.pbName+' <small>'+objPb.area+'·'+createTime+'</small>'
		$('.media-body.pbIntroduce h4').html(pbName);
		$('.media-body.pbIntroduce p').html(objPb.company);

		var field = objPb.domain.split(',');
		var fieldHtlm = '';
		for(i=0;i<field.length;i++){
            fieldHtlm+=  '<span class="label label-danger">'+ field[i]+'</span>'
		}
		$('.media-body.pbIntroduce').append(fieldHtlm)

		var yixing='';
		if (objPb.yixing==1){
            yixing='熠星项目'
		}else {
            yixing='非熠星项目'
		}
		$('#introduce small:eq(0)').html(yixing);
		var status='';
		if (objPb.status==0){
		    status='正在审核中'
		}else if(objPb.status==-1){
            status='审核失败'
		}else{
		    status='审核通过'
		}
		var attention='';
			if (objPb.attention==true) {
				attention='取消关注'
			} else{
				attention='关注'
			}
			$('.attentionPb').text(attention);
		$('#introduce small:eq(1)').html(status);
			var pbDetailContent='';
			pbDetailContent= '<li><h4>概述</h4>'+
						'<p>'+objPb.summary+'</p>'+
						'<div class="panel_name">公司全称：<span>'+objPb.company+'</span></div>'+
					 '</li>'+
					'<li><h4>详细介绍</h4><section>产品服务</section>'+
					'<p>'+objPb.synopsis+ '</p>'+
			 '</li>'+
			'<li><h4>团队人数</h4>'+
				'<section>'+objPb.personNum+ '</section>'+
			 '</li>'+
					'<li><h4>团队介绍</h4>'+
					'<section>'+objPb.team+ '</section>'+
					'</li>'+
			'<li> <h4>技术关键字</h4>'+
				'<section>'+ objPb.keyword+ '</section>'+
			 '</li>'+
			'<li> <h4>融资阶段</h4>'+
				'<section>'+objPb.financingStage+'</section>'+
			 '</li>'+
			'<li class="businessPlan"> <h4>商业计划书</h4>'+
				'<section><a href="'+ objPb.businessPlan+'">在线预览</a> <a href="'+ objPb.businessPlan+'" download="">点击下载</a></section>'+
					'</li>';

			if(objPb.pptFile){
				pbDetailContent+='<li class="pptFile"> <h4>熠星ppt介绍</h4>'+
						'<section> <a href="'+ objPb.pptFile+'" >在线查阅</a></section>'+
						'</li>'
			}
            $('.pptFile a').media();

			if(objPb.videoFile){
				pbDetailContent+='<li class="videoFile"> <h4>熠星视频介绍</h4>'+
                        '<video id="videoFile" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" data-setup="{}">'+
                            '<source src="'+objPb.videoFile+'" type="video/mp4" />'+
                            '<source src="'+objPb.videoFile+'" type="video/webm"" />'+
                            '<source src="'+objPb.videoFile+'" type="video/ogg" />'+
                            '<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"/>'+
                            '<track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"/>'+
                        '</video>'+
						'</li>';
                //视频在线播放
                var myPlayer = videojs('videoFile');
                videojs("videoFile").ready(function(){
                    var myPlayer = this;
                    myPlayer.play();
                });


            }

			$('#pbDetailList').html(pbDetailContent);

			$('.businessPlan a:eq(0)').media();

			if(!objPb.company){
				$('.panel_name').hide();
			}

			if(objPb.open==0){
				$('.businessPlan').hide();
			}



			//相关项目
			var conform = data.result.conform;
				var htmls='';
				for(var j=0;j<conform.length;j++){
					var attentions='';
					var createTimes='';
					if (conform[j].attention==true) {
						attentions='取消关注'
					} else{
						attentions='关注'
					}
					if(conform[j].userId==userId){
						attention='我';
					}
					htmls+= '<dd>'+
							'<div class="row">'+
							'<div class="col-xs-2" style="padding-top:3px ;"><img src="'+conform[j].logo +'" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/> <a href="cyzfw_ckds.html?'+ conform[j].id +'">'+ conform[j].pbName+'</a></div>'+
							'<div class="col-xs-2">'+conform[j].stage+'</div>'+
							'<div class="col-xs-2">'+ conform[j].field+'</div>'+
							'<div class="col-xs-2">'+ conform[j].tutorNames+'</div>'+
							'<div class="col-xs-2">'+ conform[j].invests+'</div>'+
							'<div class="col-xs-2 attentionPb" attentionId="'+conform[j].id+'">'+ attention +'</div>'+
							'</div>'+
							'</dd>'
				}

			$('#RelatedPb').html(htmls);


		}






    });

    $('.businessPlan a:eq(0)').media();

	function onErrorHandle(obj){
		obj.src="../img/defaultAvatar.png";
	}

	//关注项目
	$(document).on('click','.attentionPb',function () {
		if (person==''||person==null) {
			window.location.href='denglu.html';
			return;
		}
		if ($(this).text()=='我的项目'){
			return false;
		}

		if($(this).text()=='关注'){
			$(this).text('取消关注')
		}else {
			$(this).text('关注')
		}
		attentionPb();
		function attentionPb() {
			$.ajax({
				type: "post",
				data:{'userId':userId},
				url:"http://114.112.96.184:18080/auth/attentionPb/"+id,
				async: false,
				error: function(request) {
					console.log("Connection error");
				},
				success: function(data) {
					console.log(data);

				}
			});
		}

	});

	//相关项目
//	getTutorList({'userId':userId},1,10);
//	function getTutorList(objs,page,pageSize) {
//		objs.index=page;
//		objs.size=pageSize;
//		$.ajax({
//			type: "get",
//			data:objs,
//			url:"http://114.112.96.184:18080/view/tutors",
//			async: false,
//			error: function(request) {
//				console.log("Connection error");
//			},
//			success: function(data) {
//				console.log(data);
//				var pages=Math.ceil(data.result.totalElements/10);
//				if(pages<=1){
//					$("#pageTutor").hide();
//				}else{
//					$("#pageTutor").show();
//				}
//				var options= {
//					bootstrapMajorVersion: 3,
//					currentPage: page,    //当前页数
//					numberOfPages: 10,
//					totalPages: pages,    //所有数据可以显示的页数
//					tooltipTitles: function () {
//					},
//					itemTexts: function (type, page, current) {
//						switch (type) {
//							case "prev":
//								return "←上一页";
//							case "next":
//								return "下一页→";
//							case "page":
//								return page;
//						}
//					},
//					shouldShowPage: function (type, page, current) {
//						switch (type) {
//							case "first":
//							case "last":
//								return false;
//							default:
//								return true;
//						}
//					},
//					onPageClicked: function (event, originalEvent, type, page) {
//						objs.index=page;
//						$.ajax({
//							type: "get",
//							data: {'userId': userId, 'index': page, 'size': pageSize},
//							url: "http://114.112.96.184:18080/view/tutors",
//							async: false,
//							error: function (request) {
//								console.log("Connection error");
//							},
//							success: function (data) {
//								var obj = data.result.content;
//								var htmls='';
//								for (var i = 0; i < obj.length;i++) {
//									var attention='';
//									var createTime='';
//									if (obj[i].attention==true) {
//										attention='取消关注'
//									} else{
//										attention='关注'
//									}
//									if(obj[i].userId==userId){
//										attention='我';
//									}
//									htmls+= '<dd>'+
//											'<div class="row">'+
//											'<div class="col-xs-2" style="padding-top:3px ;"><img src="'+obj[i].avatar +'" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/> <a href="cyzfw_ckds.html?'+ obj[i].id +'">'+ obj[i].realName+'</a></div>'+
//											'<div class="col-xs-2">'+obj[i].case+'</div>'+
//											'<div class="col-xs-2">'+ obj[i].education+'</div>'+
//											'<div class="col-xs-2">'+ obj[i].area+'</div>'+
//											'<div class="col-xs-2">'+ obj[i].researchField+'</div>'+
//											'<div class="col-xs-2 attentionTutor" attentionId="'+obj[i].id+'">'+ attention +'</div>'+
//											'</div>'+
//											'</dd>'
//								}
//								$('#daoshi_list').html(htmls);
//							}
//						})
//
//
//					}
//				}
//
//				if(data.result.totalElements>0){
//					$("#pageTutor").bootstrapPaginator(options);
//				}
//
//				var obj = data.result.content;
//				var htmls='';
//				for (var i = 0; i < obj.length;i++) {
//					var attention='';
//					var createTime='';
//					if (obj[i].attention==true) {
//						attention='取消关注'
//					} else{
//						attention='关注'
//					}
//					htmls+= '<dd>'+
//							'<div class="row">'+
//							'<div class="col-xs-2" style="padding-top:3px ;"><img src="'+obj[i].avatar +'" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/> <a href="cyzfw_ckds.html?'+ obj[i].id +'">'+ obj[i].realName+'</a></div>'+
//							'<div class="col-xs-2">'+obj[i].case+'</div>'+
//							'<div class="col-xs-2">'+ obj[i].education+'</div>'+
//							'<div class="col-xs-2">'+ obj[i].area+'</div>'+
//							'<div class="col-xs-2">'+ obj[i].researchField+'</div>'+
//							'<div class="col-xs-2 attentionTutor" attentionId="'+obj[i].id+'">'+ attention +'</div>'+
//							'</div>'+
//							'</dd>'
//				}
//				$('#daoshi_list').html(htmls);
//
//			}
//		});
//	}
//

</script>
</html>
